package sss.myException;

/**
 * @program: JavaSEDemo
 * @description:
 * @author: DingZhenYun
 * @create: 2021-08-24 22:42
 **/

public class TestReturn3 {
    public static void main(String[] args) {
        int result = test("a");
        System.out.println(result);
    }

    public static int test(String str){
        try{
            Integer.parseInt(str);
            return 1;
        }catch(NumberFormatException e){
            return -1;
        }finally{
            System.out.println("test结束");
            return 0;
        }
    }
}
